<%@page import="com.kucun.bean.Users"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
response.setHeader("Pragma","No-cache"); 
response.setHeader("Cache-Control","no-cache"); 
response.setDateHeader("Expires", 0); 
Users user= (Users)request.getSession().getAttribute("user");
response.flushBuffer();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../css/index.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/icon.css">
<link rel="stylesheet" type="text/css" href="../jquery-easyui-1.4.5/themes/color.css">
<script type="text/javascript" src="../jquery-easyui-1.4.5/jquery.min.js"></script>
<script type="text/javascript" src="../jquery-easyui-1.4.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../js/repertory.js"></script>

<title>仓库管理</title>
<script type="text/javascript">
   var path="<%=basePath%>";
   var role="<%=user.getPower()%>"; 
</script>
</head>
<body>
<div>
<table id="goods" style="height: 555px;"></table>
</div> 
<div region="center"  split="true"   title="客户信息" style="overflow: hidden;">
<table id="goods"></table>
</div>
<!-- 右键菜单 -->
  	<div id="div_rightmenu" class="easyui-menu" style="width:80px;">   
  		 <div data-options="iconCls:'icon-add'" onclick='add_child(1)'>增加下级</div>   
         <div data-options="iconCls:'icon-add'"  onclick='add_subling()'>增加同级</div>  
         <div data-options="iconCls:'icon-edit'" onclick='edit_org()'>编辑节点</div>  
         <div data-options="iconCls:'icon-cancel'" onclick='del()'>删除本级</div> 
  	</div>


  	<!-- 添加子节点、编辑节点、添加同级节点 -->
  	<div id="div_node" class="easyui-dialog" style="width:300px;height:400px;closed:true" data-options="title:'编辑数据',modal:true,closed:true,buttons:[{text:'确定', handler:function(){savedate(this)} },{text:'关闭', handler:function(){$('#goods').treegrid('reload');$('#div_node').window('close')} }]">
  		<form name="form_node" id="form_node" method="post">
  			<table align="center">
  				<tr style="display: none;">
  					<td>
  					<input type="hidden" name="tag" id="tag" value="1"/>
  					<input type="hidden" name="id" />
  					</td><!-- flag==0表示添加，flag=1表示编辑 -->
  				</tr>
  				<tr>
  					<td>名称：</td>
  					<td><input type="text" name="titles" id="titles" class="easyui-textbox" data-options="required:true"/></td>
  				</tr>
  				<tr>
  					<td>地址：</td>
  					<td><input type="text" name="address" class="easyui-textbox" /></td>
  				</tr>
  				<tr>
  					<td>上级ID：</td>
  					<td><input type="text"  name="parentid" id="parentid" class="easyui-numberbox" data-options="readonly:true"/></td>
  				</tr>
  				<tr>
  					<td>联系人：</td>
  					<td><input type="text" name="manegername"  id="manegername" class="easyui-textbox" /></td>
  				</tr>
  				<tr>
  					<td>联系人电话：</td>
  					<td><input type="text" name="manegertell" id="manegertell" class="easyui-textbox" /></td>
  				</tr>
  				<!-- <tr>
				     <td>是否启用：</td>
				     <td>
				     <select id="isused" class="easyui-combobox"  name="isused" style="width:150px;">   
					    <option value="0">启用</option>   
					    <option value="1">停用</option>    
					</select>
				     </td>
				   </tr> -->
  				
  			</table>
  		</form>
  	</div>
  	
  	
  	
  	<!-- 删除 -->
  	<div id="div_rightmenu_person" class="easyui-menu" style="width:80px;">  
  		 <div data-options="iconCls:'icon-add'"  onclick='add_person()'>增加人员</div>   
  		 <div data-options="iconCls:'icon-remove'" onclick='remove_person()'>移除组织</div>   
  	</div>
  	
  	<div id="div_window" style="display: none;">
  		<form action="" id="operateform">
  			<table align="center" style="line-height: 35px;">
  				<tr>
  					<td>组织架构：</td>
  					<td><input type="text" name="orgid"   id="edit_org"   /></td>
  				</tr>
  				<tr>
  					<td>操作人员：</td>
  					<td><input type="text" name="userids"   id="edit_userids"  style='width:250px;'  /></td>
  				</tr>
  				<tr>
  					<td colspan="2" align="center">
  						<button id="btnedit_save" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">保存</button>
  					</td>
  				</tr>
  			</table>
  		</form>
  	</div>  
</body>
</html>